/**
 * Created by henian.xu on 2018/9/27.
 * 入口
 */

import './assets/style/app.scss';
import DefaultImg from './assets/images/default.jpg';
import * as Utils from './utils';
import filter from './filter';
import directives from './directives';

import ElementUi from 'element-ui';
import components from './components';
import BaiduMap from 'vue-baidu-map';

export default {
    install(Vue, options) {
        const { router, store, globalVar, config } = options;
        // 注入
        Vue.prototype.$defaultImg = DefaultImg;
        Vue.prototype.$globalVar = globalVar;
        Vue.prototype.$config = config;
        Vue.prototype.$utils = Utils;
        // Vue.prototype.$http = HttpInstance;
        // Vue.prototype.$api = api;

        Vue.use(filter);
        Vue.use(directives, { router, store });
        Vue.use(ElementUi);
        Vue.use(components);
        Vue.use(BaiduMap, { ak: globalVar.mapKey.baiduAK });
    },
};
export { Utils };
